// [技术]系统访问记录
import { axios } from '@/utils/request';

/**
 * 获取LoginInfo
 * @params params
 * {
    {"id":{"required":true,"type":"integer"}}
   }
 */
export function getLoginInfo(params) {
  return axios({
    method: 'get',
    url: 'login-info',
    params
  })
}

/**
 * 创建LoginInfo
 * @params data
 * {
    {"browser":{"type":"string"}},
    {"id":{"type":"integer"}},
    {"ipaddr":{"type":"string"}},
    {"loginLocation":{"type":"string"}},
    {"loginName":{"type":"string"}},
    {"loginTime":{"type":"string"}},
    {"msg":{"type":"string"}},
    {"os":{"type":"string"}},
    {"status":{"type":"integer"}}
   }
 */
export function postLoginInfo(data) {
  return axios({
    method: 'post',
    url: 'login-info',
    data
  })
}

/**
 * 修改LoginInfo
 * @params data
 * {
    {"browser":{"type":"string"}},
    {"id":{"type":"integer"}},
    {"ipaddr":{"type":"string"}},
    {"loginLocation":{"type":"string"}},
    {"loginName":{"type":"string"}},
    {"loginTime":{"type":"string"}},
    {"msg":{"type":"string"}},
    {"os":{"type":"string"}},
    {"status":{"type":"integer"}}
   }
 */
export function putLoginInfo(data) {
  return axios({
    method: 'put',
    url: 'login-info',
    data
  })
}

/**
 * 删除LoginInfo
 * @params params
 * {
    {"ids":{"required":true,"type":"string"}}
   }
 */
export function deleteLoginInfo(params) {
  return axios({
    method: 'delete',
    url: '/login-info',
    params
  })
}

/**
 * 获取所有LoginInfo
 * @params params
 * {
    {"page":{"required":true,"type":"integer"}},
    {"pageSize":{"required":true,"type":"integer"}}
   }
 */
export function getLoginInfoList(params) {
  return axios({
    method: 'get',
    url: 'login-info/list',
    params
  })
}